<?php
 Zend_Loader::loadClass("CodesUtility"); 
 Zend_Loader::loadClass("BaseDBRow");
 class Contact extends BaseDBRow
 {
	const _tablename = "projecte_entity.contacts";
 	protected function setUp()
 	{
 		$this->_tableName = self::_tablename;		
 	}
	
	public function getContactById($contactId) {
	
		Zend_Loader::loadClass("QueryCreator");
		
		$query = new QueryCreator();
		$query->addSelect(" * ");
		$query->addFrom($this->_tableName . " c ");
		$query->addWhere(" contact_id = " . $contactId);
		
		$db = DBCon::instance();
		// echo  $query->createSQL();die();
		$result = $db->executeQuery($query->createSQL());
		return $result;
		
	}
 }
?>